home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{BE5AB243-F888-11D0-9F5E-B42103C10710}#1.0#0"; "DPDLG.OCX"
- Begin VB.Form frmMain
- BorderStyle = 3 'Fixed Dialog
- Caption = "Directory Picker Example"
- ClientHeight = 3504
- ClientLeft = 36
- ClientTop = 336
- ClientWidth = 7164
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 3504
- ScaleWidth = 7164
- ShowInTaskbar = 0 'False
- StartUpPosition = 3 'Windows Default
- Begin VB.ComboBox cmboRoot
- Height = 288
- ItemData = "frmMain.frx":0000
- Left = 5040
- List = "frmMain.frx":002E
- Style = 2 'Dropdown List
- TabIndex = 13
- Top = 2400
- Width = 2052
- End
- Begin VB.TextBox txtCaption
- Height = 288
- Left = 960
- TabIndex = 11
- Top = 240
- Width = 4692
- End
- Begin VB.CommandButton cmdClose
- Cancel = -1 'True
- Caption = "Close"
- Height = 372
- Left = 5880
- TabIndex = 10
- Top = 720
- Width = 1092
- End
- Begin VB.CheckBox chkROFSD
- Caption = "Return Only File System D&irs"
- Height = 252
- Left = 120
- TabIndex = 9
- Top = 3000
- Width = 3852
- End
- Begin VB.CheckBox chkRFSA
- Caption = "Return File System &Ancestors"
- Height = 252
- Left = 120
- TabIndex = 8
- Top = 2640
- Width = 3852
- End
- Begin VB.CheckBox chkDGBD
- Caption = "Don't Go Below &Domain"
- Height = 252
- Left = 120
- TabIndex = 7
- Top = 2280
- Width = 3852
- End
- Begin VB.CheckBox chkBFP
- Caption = "Browse For &Printer"
- Height = 252
- Left = 120
- TabIndex = 6
- Top = 1920
- Width = 3852
- End
- Begin VB.CheckBox chkBFC
- Caption = "Browse For &Computer"
- Height = 252
- Left = 120
- TabIndex = 5
- Top = 1560
- Width = 3852
- End
- Begin VB.CommandButton cmdShow
- Caption = "Show..."
- Default = -1 'True
- Height = 372
- Left = 5880
- TabIndex = 4
- Top = 240
- Width = 1092
- End
- Begin VB.TextBox txtPath
- Enabled = 0 'False
- Height = 288
- Left = 960
- TabIndex = 3
- Top = 960
- Width = 4692
- End
- Begin VB.TextBox txtFolder
- Enabled = 0 'False
- Height = 288
- Left = 960
- TabIndex = 2
- Top = 600
- Width = 4692
- End
- Begin DPDLGLib.DPDlg dpdMain
- Left = 4800
- Top = 3000
- _Version = 65536
- _ExtentX = 677
- _ExtentY = 677
- _StockProps = 2
- Caption = "Select A Folder"
- End
- Begin VB.Image imgIcon
- Height = 492
- Left = 5160
- Top = 1560
- Width = 492
- End
- Begin VB.Label lblIcon
- Caption = "Icon:"
- Height = 252
- Left = 4440
- TabIndex = 15
- Top = 1680
- Width = 492
- End
- Begin VB.Label lblRoot
- Caption = "&Root:"
- Height = 252
- Left = 4440
- TabIndex = 14
- Top = 2400
- Width = 492
- End
- Begin VB.Label lblCaption
- Caption = "Caption:"
- Height = 252
- Left = 120
- TabIndex = 12
- Top = 240
- Width = 732
- End
- Begin VB.Label lblPath
- Caption = "Path:"
- Height = 252
- Left = 120
- TabIndex = 1
- Top = 960
- Width = 732
- End
- Begin VB.Label lblFolder
- Caption = "Folder:"
- Height = 252
- Left = 120
- TabIndex = 0
- Top = 600
- Width = 732
- End
- Attribute VB_Name = "frmMain"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub chkBFC_Click()
- If chkBFC.Value = 1 Then
- dpdMain.BrowseForComputer = True
- Else
- dpdMain.BrowseForComputer = False
- End If
- End Sub
- Private Sub chkBFP_Click()
- If chkBFP.Value = 1 Then
- dpdMain.BrowseForPrinter = True
- Else
- dpdMain.BrowseForPrinter = False
- End If
- End Sub
- Private Sub chkDGBD_Click()
- If chkDGBD.Value = 1 Then
- dpdMain.DontGoBelowDomain = True
- Else
- dpdMain.DontGoBelowDomain = False
- End If
- End Sub
- Private Sub chkRFSA_Click()
- If chkRFSA.Value = 1 Then
- dpdMain.ReturnFSAncestors = True
- Else
- dpdMain.ReturnFSAncestors = False
- End If
- End Sub
- Private Sub chkROFSD_Click()
- If chkROFSD.Value = 1 Then
- dpdMain.ReturnOnlyFSDirs = True
- Else
- dpdMain.ReturnOnlyFSDirs = False
- End If
- End Sub
- Private Sub cmdClose_Click()
- End
- End Sub
- Private Sub cmdShow_Click()
- ' Set the caption to that given by the user
- dpdMain.Caption = txtCaption.Text
- ' Get the root from the combo box
- dpdMain.Root = cmboRoot.ListIndex
- ' Very Important! Makes Browse dialog modal for this application's window
- dpdMain.hWnd = frmMain.hWnd
- ' Show the dialog box
- If (dpdMain.Show) Then
-
- ' If Show returns TRUE then everything went OK, so display the folder
- ' and path
- txtFolder.Text = dpdMain.Folder
- txtPath.Text = dpdMain.Path
- imgIcon.Picture = dpdMain.Icon
-
- End If
- End Sub
- Private Sub Form_Load()
- ' Setup the design time options
- chkBFC.Value = IIf(dpdMain.BrowseForComputer, 1, 0)
- chkBFP.Value = IIf(dpdMain.BrowseForPrinter, 1, 0)
- chkDGBD.Value = IIf(dpdMain.DontGoBelowDomain, 1, 0)
- chkRFSA.Value = IIf(dpdMain.ReturnFSAncestors, 1, 0)
- chkROFSD.Value = IIf(dpdMain.ReturnOnlyFSDirs, 1, 0)
- cmboRoot.ListIndex = dpdMain.Root
- txtCaption.Text = dpdMain.Caption
- End Sub
- Private Sub Image1_Click()
- End Sub
-